package com.module.sysconfig.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.module.sysconfig.dao.YwlxpzMapper;
import com.module.sysconfig.dao.ZdbMapper;
import com.module.sysconfig.entity.Ywlxpz;
import com.module.sysconfig.service.YwlxpzService;
import com.support.cache.annotation.CacheEvict;
import com.support.cache.annotation.CacheKey;
import com.support.cache.annotation.Cacheable;
import com.support.cache.annotation.KeyMode;
import com.support.jdbc.Page;

@Service
public class YwlxpzServiceImpl implements YwlxpzService{
	
	@Autowired
	private YwlxpzMapper ywlxpzMapper;
	
	
	/**
	 * 新增业务类型配置数据
	 */
	@CacheEvict(key="ALL_YWLXPZ_RECORD")
	public void saveYwlxpz(Ywlxpz ywlxpz) 
	{
		ywlxpzMapper.saveYwlxpz(ywlxpz);
		
	}
	
	/**
	 * 修改业务类型配置数据
	 */
	@CacheEvict(key="ALL_YWLXPZ_RECORD")
	public void updateYwlxpz(Ywlxpz ywlxpz) 
	{
		ywlxpzMapper.updateYwlxpz(ywlxpz);
	}
	
	/**
	 * 删除业务类型配置数据
	 */
	@CacheEvict(key="ALL_YWLXPZ_RECORD")
	public void deleteYwlxpz(long id) 
	{
		ywlxpzMapper.deleteYwlxpz(id);
	}

	/**
	 * 查询业务类型配置数据
	 */
	@Cacheable(keyMode=KeyMode.KEY_ONLY, key="ALL_YWLXPZ_RECORD")
	public List<Map<String, String>> queryYwlxpz() {
	
		List<Map<String, String>> records = ywlxpzMapper.queryYwlxpz();
		return records;
	}
	/**
	 * 按ID查询业务类型配置数据
	 */
	public Ywlxpz queryYwlxpzById(long id) {
		return ywlxpzMapper.queryYwlxpzById(id);
	}



}
